package com.jb.faces.context;

import com.jb.faces.application.Application;
import com.jb.faces.application.FacesMessage;
import com.jb.faces.component.UIViewRoot;

public abstract class FacesContext {
    Application application;
    ExternalContext externalContext;
    UIViewRoot viewRoot;
    boolean renderResponse;

    public Application getApplication() {
        return application;
    }

    public ExternalContext getExternalContext() {
        return externalContext;
    }

    public boolean getRenderResponse() {
        return renderResponse;
    }

    public abstract ResponseWriter getResponseWriter();

    public void setViewRoot(UIViewRoot viewRoot) {
        this.viewRoot = viewRoot;
    }

    public UIViewRoot getViewRoot() {
        return viewRoot;
    }

    public void addMessage(String objectId, FacesMessage msg) {
        //
    }

    public void renderResponse() {
        renderResponse = true;
    }
}
